from django.contrib.syndication.feeds import Feed
from lab.blog.models import Post
from django.utils.feedgenerator import Atom1Feed

class BlogRss(Feed):
    title = "9308 Blog"
    link = "/blog/"
    description = "Latest Blog Entries."

    def items(self):
        return Post.objects.order_by('-date')[:15]
    
    
class BlogAtom(BlogRss):
    feed_type = Atom1Feed
    subtitle = BlogRss.description
    